<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Order_fs extends CI_Controller {

    function __construct() {

        parent::__construct();
        $this->load->helper('url');
        $this->load->library(array('form_validation', 'session'));
        $this->load->library('adminlayout');
        $this->adminlayout->setLayout("admin/layout");
        $userSession = $this->session->userdata('user');

        if ($userSession['username'] == false) {
            redirect(base_url('/index/login?returnUrl=') . urlencode(RETURN_URL));
        } else {
            if ($userSession['useradmin'] != 1) {
                redirect(base_url('nhanvien/event/list_event'));
            }
        }
    }

    function getList() {
        $data['sort'] = $_GET["jtSorting"];
        $data['startIndex'] = $_GET["jtStartIndex"];
        $data['pageSize'] = $_GET["jtPageSize"];
        $this->load->model("order_model");
        $result = $this->order_model->getList($data);
        $jTableResult = array();
        $jTableResult['Result'] = "OK";
        $jTableResult['TotalRecordCount'] = $result['recordCount'];
        $jTableResult['Records'] = $result['query'];
        print json_encode($jTableResult);
    }
    
    
    

    function page() {
        return true;
    }

     function listOrder(){
        
        $title = 'Danh sách ho so cua nhan cmn vien';
//        $this->adminlayout->view("admin/list_order",null ,$title);
        
    }
    
    
}

?>
